<template>
	<view class="xp24">
		<u-parse :content="cont"></u-parse>
	</view>
</template>

<script setup>
	import {
		onReachBottom,
		onShow,
		onLoad,
		onPageScroll
	} from '@dcloudio/uni-app';
	import {ref} from "vue"
	
	import {content,memberdetail} from "@/network/home.js"
	
	let cont = ref('')
	let id = ref()
	
	
	const getcontent = (val) =>{
		content({name:val}).then(res=>{
			console.log(res);
			cont.value = res.data
		})
	}
	
	const getmemberdetail = () =>{
		memberdetail({id:id.value}).then(res=>{
			cont.value = res.data.content
		})
	}
	
	onLoad((option)=>{
		uni.setNavigationBarTitle({
			title:option.title
		})
		if(option.utype == 1){
			id.value = option.id
			getmemberdetail()
		}else{
			getcontent(option.type)
		}
		
		
	})
	
	
</script>

<style>

</style>
